﻿using Adnc.Application.Shared.Dtos;
using Adnc.Application.Shared.Services;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WYT.Sys.Application.Contracts.Dtos.RedNews;

namespace WYT.Sys.Application.Contracts.Services
{
    /// <summary>
    /// 小红书服务
    /// </summary>
    public interface IRedNewsAppService : IAppService
    {
        /// <summary>
        /// 获取分组
        /// </summary>
        /// <returns></returns>
        Task<AppSrvResult<List<RedNewsGroupDto>>> GetRedNewsGroup();

        /// <summary>
        /// 用户分享
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="redNewsId"></param>
        /// <returns></returns>
        Task<AppSrvResult<bool>> SharedAsync(long userId, long redNewsId);

        /// <summary>
        /// 用户收藏
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="redNewsId"></param>
        /// <returns></returns>
        Task<AppSrvResult<bool>> FavoriteAsync(long userId, long redNewsId);

        /// <summary>
        /// 取消收藏
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<AppSrvResult<bool>> CancelFavoriteAsync(long userId, long Id);

        /// <summary>
        /// 获取用户收藏列表
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<PageModelDto<RedNewsListDto>>> GetUserFavorite(long userId, SearchPagedDto input);

        /// <summary>
        /// 用户点赞
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="redNewsId"></param>
        /// <returns></returns>
        Task<AppSrvResult<bool>> PraisedAsync(long userId, long redNewsId);

        /// <summary>
        /// 获取小红书
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<PageModelDto<RedNewsListDto>>> GetRedNews(RedNewsSearchPagedDto input);

        /// <summary>
        /// 根据Id获取小红书
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="redNewsId"></param>
        /// <returns></returns>
        Task<AppSrvResult<RedNewsDetailDto>> GetRedNewsByID(long userId, long redNewsId);

        /// <summary>
        /// 获取评论
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<PageModelDto<RedNewsCommentsListDto>>> GetComments(SearchPagedDto<long> input);

        /// <summary>
        /// 添加评论
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<bool>> PublishComments(long userId, RedNewsCommentsAddDto input);

        /// <summary>
        /// 添加小红书
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<bool>> AddRedNews(long userId, RedNewsAddDto input);

        /// <summary>
        /// 获取用户自己发表的小红书
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<PageModelDto<RedNewsSimpleDot>>> GetUserRedNews(long userId,SearchPagedDto input);
    }
}
